import Vue from "vue"

export default {
    /**
     * 通过医师编号获取医师被预约记录
     * @param {*} params 
     * @param {*} config 
     */
    async getAppointmentRecordListByDoctorID(params = {}, config = {}) {
        config.params = params;
        let result = await Vue.http.get('/AppointmentRecord/GetAppointmentRecordListByDoctorID', config);
        return result;
    },
    /**
     * 预约下单
     * @param {*} params 
     * @param {*} config 
     */
    async createAppointment(params = {}, config = {}) {
        let result = await Vue.http.post('/AppointmentRecord/CreateAppointment', params, config);
        return result;
    },
    /**
     * 根据用户编号获取预约记录
     * @param {*} params 
     * @param {*} config 
     */
    async getAppointmentRecordListByUserID(params = {}, config = {}) {
        config.params = params;
        let result = await Vue.http.get('/AppointmentRecord/GetAppointmentRecordListByUserID', config);
        return result;
    },
    /**
     * 分页获取预约记录信息
     *
     * @param {*} [params={}]
     * @param {*} [config={}]
     * @returns
     */
    async GetAppointmentRecordList(params = {}, config = {}) {
        config.params = params;
        let result = await Vue.http.get('/AppointmentRecord/GetAppointmentRecordList', config);
        return result;
    }
}